#ifndef SHADOW3D_H
#define SHADOW3D_H
#include "treegen.h"
#include "GL/glu.h"

class Shadow3D
{
public:
    Shadow3D();
    ~Shadow3D();
    void clearGrid();
    void populateGrid(Bud *bud);
    void queryQ(Bud *bud);
    inline void convertToIndex(float3 loc, int &x, int &y, int &z);
    inline void indexToXY(int x, int y, int z, float3 &loc);
    void draw();

private:
    float *m_grid;
    float m_max;
    void recurPopulate(Bud *bud);
    //for testing:
    void printgrid(int x, int y, int z);
    GLUquadric *m_quadric;
};

#endif // SHADOW3D_H
